package com.bbs.services;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bbs.bean.BbsCollectInfo;
import com.bbs.dao.BbsCollectInfoDao;

@Transactional
@Service
public class BbsCollectInfoManager {
	private BbsCollectInfoDao bbsCollectInfoDao;

	public BbsCollectInfoDao getBbsCollectInfoDao() {
		return bbsCollectInfoDao;
	}

	public void setBbsCollectInfoDao(BbsCollectInfoDao bbsCollectInfoDao) {
		this.bbsCollectInfoDao = bbsCollectInfoDao;
	}
	
	public void save(BbsCollectInfo bbsCollectInfo){
		bbsCollectInfoDao.save(bbsCollectInfo);
	}
	
	public void update(BbsCollectInfo bbsCollectInfo){
		bbsCollectInfoDao.update(bbsCollectInfo);
	}
	
	public void delete(int id){
		bbsCollectInfoDao.deleteById(id);
	}
	
	public List findAll(){
		return bbsCollectInfoDao.findAll();
	}
}
